<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - AI未来</title>
    <!-- 使用Font Awesome图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        /* 全局样式 */
        body {
            font-family: Arial, sans-serif;
            background: linear-gradient(to bottom, #f0f2f5, #fff);
            margin: 0;
            padding: 0;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 登录容器样式 */
        .login-container {
            background-color: #fff;
            border-radius: 12px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            padding: 40px;
            max-width: 400px;
            margin: 50px auto;
        }

        .login-container h2 {
            text-align: center;
            margin-bottom: 20px;
            font-size: 28px;
            color: #333;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-size: 14px;
            color: #666;
        }

        .form-group input {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 16px;
        }

        .login-button {
            width: 100%;
            padding: 12px;
            background: linear-gradient(to right, #165DFF, #722ED1);
            border: none;
            border-radius: 6px;
            color: #fff;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .login-button:hover {
            background: linear-gradient(to right, #165DFF 30%, #722ED1);
        }

        .auth-switch {
            text-align: center;
            margin-top: 20px;
            font-size: 14px;
            color: #666;
        }

        .auth-switch a {
            color: #165DFF;
            text-decoration: none;
        }

        .auth-switch a:hover {
            text-decoration: underline;
        }
    </style>
</head>

<body>

    <!-- 登录容器 -->
    <div class="login-container">
        <h2>登录</h2>
        <form id="loginForm">
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" id="username" required>
            </div>
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" required>
            </div>
            <button type="submit" class="login-button">登录</button>
        </form>
        <div class="auth-switch">
            还没有账号？<a href="register.html">注册</a>
        </div>
    </div>

    <script>
        document.getElementById('loginForm').addEventListener('submit', function (e) {
            e.preventDefault();
            const username = document.getElementById('username').value;
            const password = document.getElementById('password').value;

            if (username && password) {
                // 这里可以添加登录验证逻辑
                alert('登录成功！');
                window.location.href = 'AI-web.html';
            } else {
                alert('请输入用户名和密码');
            }
        });
    </script>
</body>

</html>